|
|
|
|
|
|
|
|
In general, each DataReport object in your program represents a separate report. However, depending on the complexity of your reports, you might be able to manipulate the report enough from code to use a single DataReport object for multiple reports.  |
|
|
|
|
|
|
|
|
|
|
Figure 29.1
The Data Report allows you to manage the report layout visually. |
|
|
|
|
|
|
|
|
Notice that a Data Report is divided into several sections, much like reports in Microsoft Access. These sections display the following types of information: |
|
|
|
|
|
|
|
|
Report Header. Information displayed once, at the top of the report |
|
|
|
|
|
|
|
|
Page Header. Information displayed at the top of every page |
|
|
|
|
|
|
|
|
Detail Section. The part of the report that is repeated for each record in the ADO data source |
|
|
|
|
|
|
|
|
Page Footer. Information displayed at the bottom of every page |
|
|
|
|
|
|
|
|
Report Footer. Information displayed at the end of the report |
|
|
|
|
|
|
|
|
|
You can also add your own Group header/footer sections to a report so that you can display or calculate certain fields periodically throughout the report.  |
|
|
|
|
|
|
|
|
|
|
Note that each of these sections also has a section name (for example, Section1) so that you can access it from program code. To display the properties for an individual section in the Properties window, click the section's gray title bar. To display the properties for the DataReport object, click the square in the upper-left corner. |
|
|
|
|
|
|
|
|
Setting Up the Data Report |
|
|
|
|
|
|
|
|
While you are in design mode, use the Data Report Designer window to arrange report controls on the report, just as you would arrange custom controls on a form. The types of fields that you can place on a Data Report become available in your Toolbox when the DataReport object has focus. These fields are shown in Figure 29.2. |
|
|
|
|
|